.class public abstract Lcom/estrongs/android/taskmanager/b/c;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Comparable;


# instance fields
.field public b:Lcom/estrongs/android/taskmanager/b/i;

.field protected c:Landroid/content/pm/ApplicationInfo;

.field protected d:Landroid/content/pm/PackageInfo;

.field public e:Ljava/lang/String;

.field protected f:Landroid/content/pm/PackageManager;

.field protected g:Landroid/content/Intent;

.field public h:Landroid/graphics/drawable/Drawable;

.field protected i:Ljava/lang/String;

.field protected j:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->e:Ljava/lang/String;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->h:Landroid/graphics/drawable/Drawable;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->i:Ljava/lang/String;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->j:Landroid/content/Context;

    iput-object p1, p0, Lcom/estrongs/android/taskmanager/b/c;->j:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public b()Z
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v0, v0, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v0, v0, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;

    array-length v0, v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public compareTo(Ljava/lang/Object;)I
    .locals 6

    const/4 v3, 0x0

    const/4 v2, 0x1

    const/4 v1, -0x1

    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->j:Landroid/content/Context;

    invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    const-string v4, "taskmanager_list"

    const/4 v5, -0x1

    invoke-interface {v0, v4, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
    :try_end_0
    .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    :goto_0
    check-cast p1, Lcom/estrongs/android/taskmanager/b/c;

    if-ne v0, v1, :cond_1

    if-eqz p1, :cond_0

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/b/c;->i()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1}, Lcom/estrongs/android/taskmanager/b/c;->i()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I

    move-result v1

    :cond_0
    :goto_1
    return v1

    :catch_0
    move-exception v0

    move v0, v1

    goto :goto_0

    :cond_1
    iget-object v4, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    if-eqz v4, :cond_0

    if-eqz p1, :cond_0

    iget-object v4, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    if-eqz v4, :cond_0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v4, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v4, v4, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-ge v0, v4, :cond_2

    move v1, v2

    goto :goto_1

    :cond_2
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v2, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v2, v2, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-gt v0, v2, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v2, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v2, v2, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-ne v0, v2, :cond_0

    move v1, v3

    goto :goto_1

    :cond_3
    if-ne v0, v2, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v4, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v4, v4, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-le v0, v4, :cond_4

    move v1, v2

    goto :goto_1

    :cond_4
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v2, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v2, v2, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-lt v0, v2, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v0, v0, Lcom/estrongs/android/taskmanager/b/i;->h:I

    iget-object v2, p1, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    iget v2, v2, Lcom/estrongs/android/taskmanager/b/i;->h:I

    if-ne v0, v2, :cond_0

    move v1, v3

    goto :goto_1
.end method

.method public d()Lcom/estrongs/android/taskmanager/b/i;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->b:Lcom/estrongs/android/taskmanager/b/i;

    return-object v0
.end method

.method public e()V
    .locals 2

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->f:Landroid/content/pm/PackageManager;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    iget-object v1, v1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/estrongs/android/taskmanager/b/e;->a(Landroid/content/pm/PackageManager;Ljava/lang/String;)Landroid/content/pm/PackageInfo;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    :cond_0
    return-void
.end method

.method public f()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    goto :goto_0
.end method

.method public g()Landroid/graphics/drawable/Drawable;
    .locals 2

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->h:Landroid/graphics/drawable/Drawable;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->f:Landroid/content/pm/PackageManager;

    invoke-virtual {v0, v1}, Landroid/content/pm/ApplicationInfo;->loadIcon(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->h:Landroid/graphics/drawable/Drawable;

    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->h:Landroid/graphics/drawable/Drawable;

    return-object v0
.end method

.method public h()Landroid/content/Intent;
    .locals 5

    const/4 v0, 0x0

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    if-eqz v1, :cond_1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    :cond_0
    :goto_0
    return-object v0

    :cond_1
    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->f:Landroid/content/pm/PackageManager;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v2, v2, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v1, v2}, Landroid/content/pm/PackageManager;->getLaunchIntentForPackage(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    invoke-virtual {v1}, Landroid/content/Intent;->cloneFilter()Landroid/content/Intent;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    const/high16 v2, 0x40

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    goto :goto_0

    :cond_2
    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v1, v1, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;

    array-length v1, v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_3

    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    const/high16 v2, 0x40

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v2, v2, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    iget-object v3, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v3, v3, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;

    const/4 v4, 0x0

    aget-object v3, v3, v4

    iget-object v3, v3, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    goto :goto_0

    :cond_3
    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->d:Landroid/content/pm/PackageInfo;

    iget-object v1, v1, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/b/c;->f:Landroid/content/pm/PackageManager;

    invoke-static {v1, v2}, Lcom/estrongs/android/taskmanager/b/d;->a(Ljava/lang/String;Landroid/content/pm/PackageManager;)Landroid/content/Intent;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;

    const/high16 v2, 0x40

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->g:Landroid/content/Intent;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public i()Ljava/lang/String;
    .locals 2

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->e:Ljava/lang/String;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->c:Landroid/content/pm/ApplicationInfo;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/b/c;->f:Landroid/content/pm/PackageManager;

    invoke-virtual {v0, v1}, Landroid/content/pm/ApplicationInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->e:Ljava/lang/String;

    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/b/c;->e:Ljava/lang/String;

    return-object v0
.end method
